<template>
  <div class="activity-detail">
    <h2>{{ activity.title }}</h2>
    <p>{{ activity.description }}</p>
    <p>日期: {{ activity.date }}</p>
    <p>地点: {{ activity.location }}</p>
  </div>
</template>

<script>
import activities from '../data/activities.js';

export default {
  data() {
    return {
      activity: null
    };
  },
  created() {
    const id = parseInt(this.$route.params.id);
    this.activity = activities.find(a => a.id === id);
  }
};
</script>